<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <ui:composition template="/index.xhtml">
            <ui:define name="title">
                Interview Details
            </ui:define>
            <ui:define name="content">
                <div>
                    <h:form>
                        <script type="text/javascript">
                            function confirmation() {
                                  var answer = confirm("Do you want Save?")
                                  if (answer){
                                      return true;
                                  }
                                  else{
                                      return false;
                                  }
                            }
                        </script>
                        <table border="0" class="job_data" cellpadding="5" cellspacing="1">
                            <thead>
                                <tr>
                                    <th colspan="2" style="border-bottom: 1px solid #C1DAD7;">Interview results</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td class="bd_td3" >Employee Name</td>
                                    <td class="bd_td2"><h:outputText value="#{interviewsManagedBean.inter.employees.empName}" /></td>
                                </tr>
                                <tr>
                                    <td class="bd_td3" >Applicant Name</td>
                                    <td class="bd_td2">

                                        <h:commandLink action="#{interviewsManagedBean.showApplicantsDetails}" value="#{interviewsManagedBean.inter.applicants.applicantName}" >

                                        </h:commandLink>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="bd_td3" >Vacancy Title</td>
                                    <td class="bd_td2"><h:outputText value="#{interviewsManagedBean.inter.vacances.vacantyTitle}" /></td>
                                </tr>
                                <tr>
                                    <td class="bd_td3" >Schedule Date</td>
                                    <td class="bd_td2">
                                        <p:inplace>
                                            <p:calendar style="color: #000;" value="#{interviewsManagedBean.inter.scheduleDate}" >
                                                <f:convertDateTime pattern="MM/dd/yyyy" />
                                            </p:calendar>
                                        </p:inplace>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="bd_td3" >Attached Date</td>
                                    <td class="bd_td2">
                                        <h:outputText style="color: #000;" value="#{interviewsManagedBean.inter.attachedDate}">
                                            <f:convertDateTime pattern="MM/dd/yyyy" />
                                        </h:outputText>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="bd_td3" >Start Time</td>
                                    <td class="bd_td2">
                                        <h:outputText value="#{interviewsManagedBean.inter.startTime}" /> hours
                                    </td>
                                </tr>
                                <tr>
                                    <td class="bd_td3" >End Time</td>
                                    <td class="bd_td2">
                                        <h:outputText  value="#{interviewsManagedBean.inter.endTime}" /> hours
                                    </td>
                                </tr>
                                <tr>
                                    <td class="bd_td3" >Comment :</td>
                                    <td class="bd_td2">
                                        <h:inputTextarea  cols="25" rows="5" value="#{interviewsManagedBean.inter.command}" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="bd_td3" >Status</td>

                                    <td class="bd_td2">
                                        <h:selectOneMenu disabled="true" value="#{interviewsManagedBean.inter.inStatus}">
                                            <f:selectItem itemLabel="---Select---" itemValue="0" ></f:selectItem>
                                            <f:selectItem itemLabel="Selected" itemValue="2"></f:selectItem>
                                            <f:selectItem itemLabel="Rejected" itemValue="3"></f:selectItem>
                                        </h:selectOneMenu>
                                    </td>
                                </tr>

                                <h:panelGroup rendered="#{interviewsManagedBean.inter.inStatus >= 2}">
                                    <table border="0" class="job_data" cellpadding="5" cellspacing="1">
                                        <tr>
                                            <td class="bd_td3">
                                                Status Applicants
                                            </td>
                                            <td class="bd_td2">
                                                <h:selectOneMenu  value="#{interviewsManagedBean.statusApp}">
                                                    <f:selectItem itemLabel="---Select---" itemValue="0" ></f:selectItem>
                                                    <f:selectItem itemLabel="Hired" itemValue="3"></f:selectItem>
                                                    <f:selectItem itemLabel="Banned" itemValue="4"></f:selectItem>
                                                </h:selectOneMenu>
                                            </td>
                                        </tr>
                                    </table>

                                    <table>
                                        <tr>
                                            <td style="text-align: left;">

                                                <h:commandButton value="Save" onclick="return confirmation()" action="#{interviewsManagedBean.updateStatusApplicants}"  />
                                            </td>
                                        </tr>
                                    </table>
                                </h:panelGroup>
                            </tbody>
                        </table>
                    </h:form>
                </div>
                <div>
                    <table border="0" class="job_data">
                        <thead>
                            <tr>
                                <th colspan="2" style="border-bottom: 1px solid #C1DAD7;">Contact Infomation</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td class="bd_td3">Contact Name</td>
                                <td  class="bd_td2"> VLBT Company</td>
                            </tr>
                            <tr>
                                <td class="bd_td3">Phone</td>
                                <td  class="bd_td2">(84).33344455</td>
                            </tr>
                            <tr>
                                <td class="bd_td3">Email</td>
                                <td  class="bd_td2">vlbt@hotmail.com</td>
                            </tr>
                            <tr>
                                <td class="bd_td3" colspan="2">Apply Online</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </ui:define>
        </ui:composition>
    </h:body>
</html>

